<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
		"http://www.w3.org/TR/xhtml1/DTD/xhtml-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets">
      
     <h:head>
     <title>Asterisk Voice Recognition</title>
     <link rel="stylesheet" href="css/stylesip.css" type="text/css"/>
     </h:head> 
     
     <h:body>
     
     <h1>Asterisk Voice Recognition</h1>
	    <div id="menu">

	    <ul>
			<li class='active ' ><a href="asteriskconfig.jsf" title="Home">Home</a></li>
			<li class='has-sub'><a title="Asterisk">Asterisk</a> 
				<ul>
				<li><a href="sipconfig.jsf" title="Cadastrar ramal">Cadastrar ramal SIP</a></li>
				<li><a href="siptablelist.jsf" title="Listar ramais" onclick="#{sipMB.listSip()}">Listar ramais SIP</a></li>
				<li><a href="dialplanconfig.jsf" title="Dialplan">Dialplan</a></li>
				<li><a href="initasterisk.jsf" title="Comandos Asterisk">Comandos Asterisk</a></li>
				</ul>
			</li>
			<li class='has-sub' ><a title="Verbio">Verbio</a> 
				<ul>
				<li><a href="verbioconfig.jsf"  title="Configurar">Configurar verbio</a></li>
				<li><a href="verbiotext.jsf"  title="Verbio Texto">Verbio Texto</a></li>
				<li><a href="verbiodialplan.jsf"  title="Mensagem Atendimento">Mensagem Atendimento</a></li>
				</ul>
			</li>
			<li><a href="zoiper.jsf" title="Zoiper">Zoiper</a></li>
			<li><a href="register.jsf" title="Cadastrar">Cadastrar</a></li>
			<li><a href="index.jsf" title="Sair">Sair</a></li>
		</ul>
	</div>
	
	
		<h2>Lista de Ramais</h2>

<div class="aba">
	
        <h:form id="ramaissip">
        <h:dataTable styleClass="tabela" headerClass="headertable" columnClasses="first, last"
         value="#{sipMB.lstSip}" var="item">
        	<h:column class="id">
        		<f:facet name="header">
        			<h:outputText value="ID" />
        		</f:facet>
        		<h:outputText value="#{item.id}" />
        	</h:column>
        	<h:column>
        		<f:facet name="header">
        			<h:outputText value="Nome" />
        		</f:facet>
        		<h:outputText value="#{item.name}"/>
        	</h:column>
        	<h:column>
        		<f:facet name="header">
        			<h:outputText value="Ramal" />
        		</f:facet>
        		<h:outputText value="#{item.extenNumber}" />
        	</h:column>
        	<h:column>
        		<f:facet name="header">
        			<h:outputText value="CallerID" />
        		</f:facet>
        		<h:outputText value="#{item.callerid}" />
        	</h:column>
        	<h:column>
        		<f:facet name="header">
        			<h:outputText value="Contexto" />
        		</f:facet>
        		<h:outputText value="#{item.context}" />
        	</h:column>
        	<h:column>
        		<f:facet name="header">
        			<h:outputText value="Host" />
        		</f:facet>
        		<h:outputText value="#{item.host}" />
        	</h:column>
        	<h:column>
        		<f:facet name="header">
        		</f:facet>
        		<h:commandLink value="editar" action="#{sipMB.editActionSip(item)}"  />
        	</h:column>
        	<h:column>
        		<f:facet name="header">
        		</f:facet>
        		<h:commandLink value="deletar" action="#{sipMB.deleteExtenSip(item)}"  />
        	</h:column>
        </h:dataTable>
        </h:form>
  </div>
    
    <h2>Editar Ramal Sip</h2>
    
<div class="aba1">
        <h:form id="editramaissip">
        <h:dataTable styleClass="tabela" headerClass="headertable" columnClasses="first, last"
         value="#{sipMB.editSip}" var="item">
        	<h:column class="id">
        		<f:facet name="header">
        			<h:outputText value="ID" />
        		</f:facet>
        		<h:outputText value="#{item.id}" />
        	</h:column>
        	<h:column>
        		<f:facet name="header">
        			<h:outputText value="Nome" />
        		</f:facet>
        		<h:inputText size="200" value="#{item.name}"/>
        	</h:column>
        	<h:column>
        		<f:facet name="header">
        			<h:outputText value="Ramal" />
        		</f:facet>
        		<h:inputText size="200" value="#{item.extenNumber}" />
        	</h:column>
        	<h:column>
        		<f:facet name="header">
        			<h:outputText value="CallerID" />
        		</f:facet>
        		<h:inputText size="200" value="#{item.callerid}" />
        	</h:column>
        	<h:column>
        		<f:facet name="header">
        			<h:outputText value="Contexto" />
        		</f:facet>
        		<h:inputText size="200" value="#{item.context}" />
        	</h:column>
        	<h:column>
        		<f:facet name="header">
        			<h:outputText value="Host" />
        		</f:facet>
        		<h:inputText size="200" value="#{item.host}" />
        	</h:column>
         </h:dataTable>
         
              		<h:commandButton class="nameLabel" value="Enviar" action="#"/>          
         
        </h:form>
    </div>
	
     </h:body>

</html>